using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace InduMall.Core.Models.Mapping
{
    public class StockStatuMap : EntityTypeConfiguration<StockStatu>
    {
        public StockStatuMap()
        {
            // Primary Key
            this.HasKey(t => t.StockStatusId);

            // Properties
            this.Property(t => t.StockStatusId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.StockName)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("StockStatus");
            this.Property(t => t.StockStatusId).HasColumnName("StockStatusId");
            this.Property(t => t.StockName).HasColumnName("StockName");
            this.Property(t => t.PreStatus).HasColumnName("PreStatus");
        }
    }
}
